package Server;

import Factorial.Factorial;

public class RecursionImpl implements Factorial {
    @Override
    public int fact(int n) {
        if(n==1||n==0) {

            return 1;
        }
        else {
            return n * fact(n - 1);

        }

    }
}